﻿using System.Reflection;
using Abp.AutoMapper;
using Abp.Localization;
using Abp.Modules;
using Akso.Authorization;

namespace Akso
{
    /// <summary>
    /// Application layer basic data module of the application.
    /// </summary>
    [DependsOn(
        typeof(AbpZeroTemplateCoreModule),
        typeof(AbpZeroTemplateApplicationModule))]
    public class AksoApplicationBasicDataModule : AbpModule
    {
        public override void PreInitialize()
        {
            //Adding authorization providers，but it has been loaded in the AbpZeroTemplateApplicationModule.
            //Configuration.Authorization.Providers.Add<AppAuthorizationProvider>();

            //Adding custom AutoMapper mappings
            //Configuration.Modules.AbpAutoMapper().Configurators.Add(mapper =>
            //{
            //    CustomDtoMapper.CreateMappings(mapper);
            //});
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }
}
